import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 报溢单 -- 选择
export const searchOverflowList = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff`, { params });
// 盘点单查找
export const searchInventoryList = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/findInventroy`, { params });
// 查找仓库信息
export const storageType = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/partStocks/findUserControlStorageCode`, { params });
// 查询新增报溢备件信息
export const getOverflowDate = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/findPartForAdd`, { params });
// 查询需要添加的备件信息
export const getOverflowList = (storageCode, partNo, params) => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/findPartForAddC/${storageCode}/${partNo}`, { params });
// 根据报溢单号查询报溢明细
export const getProfitItem = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/findItemByPartProfit`, { params });
// 根据盘点单号查询报溢明细
export const getProfitItemByInventoryId = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/findItemByInventroy/`, { params });
// 保存按钮
export const setProfit = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/btnSave`, params);
// 入账按钮
export const enterInAccount = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/btnAccount`, params);
// 作废按钮
export const cancellation = params => axios.delete(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/${params}`);
// 编辑
export const updateInventoryNoData = params => axios.post(`${SERVER.DMSCLOUD_PART}/basedata/reportPayOff/updateProfit`, params);
